import React, { useState,useRef,useEffect } from 'react';
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
import { DeleteOutlined, SearchOutlined,PaperClipOutlined ,PlusOutlined,EditOutlined } from '@ant-design/icons';
import {Row, Image, Button ,Popconfirm,Tooltip,message } from 'antd';
import { Link } from 'umi';

import { queryDrawing, updateDrawing, addDrawing,removeDrawing} from '@/services/drawing';

export default () => {

  const actionRef = useRef<ActionType>();
  const [createModalVisible, handleModalVisible] = useState<boolean>(false);

  const [typeEnumValues, setTypeEnumValues] = useState({});

  const columns: ProColumns<API.DrawingItem>[] = [
    {
      title: '下载人',
      search:false,
      dataIndex: 'realName',
    
    },
    {
      title: '下载时间',
      dataIndex: 'suffix',
      search:false,
    },
    {
      title: '文件名',
      dataIndex: 'typeId',
      valueType: 'select',
      valueEnum: typeEnumValues
    },
    {
      title: '文件大小(b)',
      dataIndex: 'size',
      search:false,
    },
  
  ];


 

  return (

      <ProTable
        rowKey="drawingId"
        actionRef={actionRef}
        toolBarRender={(action, { selectedRows }) => []}
        request={(params) => queryDrawing(params)}
        columns={columns}
     
      />
 
  );
};